using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using QuanLyThietBi.Config;     
using QuanLyThietBi.Entity;
namespace QuanLyThietBi.ManagerBase
{
                

     public abstract class TBL_KeHoachBaoTriManagerBase
    {
        public TBL_KeHoachBaoTriManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>TBL_KeHoachBaoTriEntity</returns>
        public TBL_KeHoachBaoTriEntity Insert(TBL_KeHoachBaoTriEntity obj)
        { 
            return (TBL_KeHoachBaoTriEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>TBL_KeHoachBaoTriEntity</returns>
        public TBL_KeHoachBaoTriEntity Update(TBL_KeHoachBaoTriEntity obj)
        { 
            return (TBL_KeHoachBaoTriEntity)Adapter.Update(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo dieu kien trong object
        /// </summary>
        /// <returns>TBL_KeHoachBaoTriEntity</returns>
        public TBL_KeHoachBaoTriEntity UpdateWithCondition(TBL_KeHoachBaoTriEntity obj,TBL_KeHoachBaoTriEntity objCond)
        { 
            return (TBL_KeHoachBaoTriEntity)Adapter.UpdateWithCondition(obj,objCond);             
        }
 
 
        public TBL_KeHoachBaoTriEntity Delete(TBL_KeHoachBaoTriEntity obj)
        { 
            return (TBL_KeHoachBaoTriEntity)Adapter.Delete(obj);             
        }
 
 
        public TBL_KeHoachBaoTriEntity DeleteWithCondition(TBL_KeHoachBaoTriEntity objCond)
        { 
            return (TBL_KeHoachBaoTriEntity)Adapter.DeleteWithCondition(objCond);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>TBL_KeHoachBaoTriEntity</returns>
        public TBL_KeHoachBaoTriEntity DeleteByGhiChu (TBL_KeHoachBaoTriEntity obj)
        { 
            return (TBL_KeHoachBaoTriEntity)Adapter.DeleteByField(obj,"GhiChu");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien GhiChu 
        /// </summary>
        /// <returns>TBL_KeHoachBaoTriEntity</returns>
        public TBL_KeHoachBaoTriEntity DeleteByGhiChu (string GhiChu )
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.GhiChu = GhiChu;  
            return (TBL_KeHoachBaoTriEntity)Adapter.DeleteByField(obj,"GhiChu");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien LanBaoTri duoc set trong object
        /// </summary>
        /// <returns>TBL_KeHoachBaoTriEntity</returns>
        public TBL_KeHoachBaoTriEntity DeleteByLanBaoTri (TBL_KeHoachBaoTriEntity obj)
        { 
            return (TBL_KeHoachBaoTriEntity)Adapter.DeleteByField(obj,"LanBaoTri");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien LanBaoTri 
        /// </summary>
        /// <returns>TBL_KeHoachBaoTriEntity</returns>
        public TBL_KeHoachBaoTriEntity DeleteByLanBaoTri (int LanBaoTri )
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.LanBaoTri = LanBaoTri;  
            return (TBL_KeHoachBaoTriEntity)Adapter.DeleteByField(obj,"LanBaoTri");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaKeHoachBT duoc set trong object
        /// </summary>
        /// <returns>TBL_KeHoachBaoTriEntity</returns>
        public TBL_KeHoachBaoTriEntity DeleteByMaKeHoachBT (TBL_KeHoachBaoTriEntity obj)
        { 
            return (TBL_KeHoachBaoTriEntity)Adapter.DeleteByField(obj,"MaKeHoachBT");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaKeHoachBT 
        /// </summary>
        /// <returns>TBL_KeHoachBaoTriEntity</returns>
        public TBL_KeHoachBaoTriEntity DeleteByMaKeHoachBT (string MaKeHoachBT )
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.MaKeHoachBT = MaKeHoachBT;  
            return (TBL_KeHoachBaoTriEntity)Adapter.DeleteByField(obj,"MaKeHoachBT");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Nam duoc set trong object
        /// </summary>
        /// <returns>TBL_KeHoachBaoTriEntity</returns>
        public TBL_KeHoachBaoTriEntity DeleteByNam (TBL_KeHoachBaoTriEntity obj)
        { 
            return (TBL_KeHoachBaoTriEntity)Adapter.DeleteByField(obj,"Nam");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Nam 
        /// </summary>
        /// <returns>TBL_KeHoachBaoTriEntity</returns>
        public TBL_KeHoachBaoTriEntity DeleteByNam (int Nam )
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.Nam = Nam;  
            return (TBL_KeHoachBaoTriEntity)Adapter.DeleteByField(obj,"Nam");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien NoiDungBaoTri duoc set trong object
        /// </summary>
        /// <returns>TBL_KeHoachBaoTriEntity</returns>
        public TBL_KeHoachBaoTriEntity DeleteByNoiDungBaoTri (TBL_KeHoachBaoTriEntity obj)
        { 
            return (TBL_KeHoachBaoTriEntity)Adapter.DeleteByField(obj,"NoiDungBaoTri");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien NoiDungBaoTri 
        /// </summary>
        /// <returns>TBL_KeHoachBaoTriEntity</returns>
        public TBL_KeHoachBaoTriEntity DeleteByNoiDungBaoTri (string NoiDungBaoTri )
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.NoiDungBaoTri = NoiDungBaoTri;  
            return (TBL_KeHoachBaoTriEntity)Adapter.DeleteByField(obj,"NoiDungBaoTri");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public TBL_KeHoachBaoTriEntity Select(TBL_KeHoachBaoTriEntity obj)
        { 
            return (TBL_KeHoachBaoTriEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(TBL_KeHoachBaoTriEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(TBL_KeHoachBaoTriEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new TBL_KeHoachBaoTriEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new TBL_KeHoachBaoTriEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<TBL_KeHoachBaoTriEntity> SelectAllLST()
        { 
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new TBL_KeHoachBaoTriEntity()),new TBL_KeHoachBaoTriEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<TBL_KeHoachBaoTriEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new TBL_KeHoachBaoTriEntity(),option),new TBL_KeHoachBaoTriEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByGhiChu (TBL_KeHoachBaoTriEntity obj)
        { 
            return Adapter.SelectByField(obj,"GhiChu");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByGhiChu (TBL_KeHoachBaoTriEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"GhiChu",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>List<TBL_KeHoachBaoTriEntity></returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByGhiChuLST (TBL_KeHoachBaoTriEntity obj)
        { 
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"GhiChu"),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>List<TBL_KeHoachBaoTriEntity></returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByGhiChuLST (TBL_KeHoachBaoTriEntity obj,SelectOptions option)
        { 
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"GhiChu",option),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByGhiChu (string GhiChu )
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.GhiChu = GhiChu;  
            return Adapter.SelectByField(obj,"GhiChu");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByGhiChu (string GhiChu, SelectOptions option)
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.GhiChu = GhiChu;  
            return Adapter.SelectByField(obj,"GhiChu",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByGhiChuLST (string GhiChu )
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.GhiChu = GhiChu;  
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"GhiChu"),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien GhiChu duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByGhiChuLST (string GhiChu, SelectOptions option)
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.GhiChu = GhiChu;  
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"GhiChu",option),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien LanBaoTri duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByLanBaoTri (TBL_KeHoachBaoTriEntity obj)
        { 
            return Adapter.SelectByField(obj,"LanBaoTri");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien LanBaoTri duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByLanBaoTri (TBL_KeHoachBaoTriEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"LanBaoTri",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien LanBaoTri duoc set trong object
        /// </summary>
        /// <returns>List<TBL_KeHoachBaoTriEntity></returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByLanBaoTriLST (TBL_KeHoachBaoTriEntity obj)
        { 
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"LanBaoTri"),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien LanBaoTri duoc set trong object
        /// </summary>
        /// <returns>List<TBL_KeHoachBaoTriEntity></returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByLanBaoTriLST (TBL_KeHoachBaoTriEntity obj,SelectOptions option)
        { 
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"LanBaoTri",option),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien LanBaoTri 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByLanBaoTri (int LanBaoTri )
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.LanBaoTri = LanBaoTri;  
            return Adapter.SelectByField(obj,"LanBaoTri");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien LanBaoTri duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByLanBaoTri (int LanBaoTri, SelectOptions option)
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.LanBaoTri = LanBaoTri;  
            return Adapter.SelectByField(obj,"LanBaoTri",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien LanBaoTri 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByLanBaoTriLST (int LanBaoTri )
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.LanBaoTri = LanBaoTri;  
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"LanBaoTri"),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien LanBaoTri duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByLanBaoTriLST (int LanBaoTri, SelectOptions option)
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.LanBaoTri = LanBaoTri;  
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"LanBaoTri",option),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaKeHoachBT duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaKeHoachBT (TBL_KeHoachBaoTriEntity obj)
        { 
            return Adapter.SelectByField(obj,"MaKeHoachBT");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaKeHoachBT duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaKeHoachBT (TBL_KeHoachBaoTriEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"MaKeHoachBT",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaKeHoachBT duoc set trong object
        /// </summary>
        /// <returns>List<TBL_KeHoachBaoTriEntity></returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByMaKeHoachBTLST (TBL_KeHoachBaoTriEntity obj)
        { 
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaKeHoachBT"),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaKeHoachBT duoc set trong object
        /// </summary>
        /// <returns>List<TBL_KeHoachBaoTriEntity></returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByMaKeHoachBTLST (TBL_KeHoachBaoTriEntity obj,SelectOptions option)
        { 
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"MaKeHoachBT",option),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaKeHoachBT 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaKeHoachBT (string MaKeHoachBT )
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.MaKeHoachBT = MaKeHoachBT;  
            return Adapter.SelectByField(obj,"MaKeHoachBT");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaKeHoachBT duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaKeHoachBT (string MaKeHoachBT, SelectOptions option)
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.MaKeHoachBT = MaKeHoachBT;  
            return Adapter.SelectByField(obj,"MaKeHoachBT",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaKeHoachBT 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByMaKeHoachBTLST (string MaKeHoachBT )
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.MaKeHoachBT = MaKeHoachBT;  
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaKeHoachBT"),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaKeHoachBT duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByMaKeHoachBTLST (string MaKeHoachBT, SelectOptions option)
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.MaKeHoachBT = MaKeHoachBT;  
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaKeHoachBT",option),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Nam duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNam (TBL_KeHoachBaoTriEntity obj)
        { 
            return Adapter.SelectByField(obj,"Nam");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Nam duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNam (TBL_KeHoachBaoTriEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Nam",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Nam duoc set trong object
        /// </summary>
        /// <returns>List<TBL_KeHoachBaoTriEntity></returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByNamLST (TBL_KeHoachBaoTriEntity obj)
        { 
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Nam"),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Nam duoc set trong object
        /// </summary>
        /// <returns>List<TBL_KeHoachBaoTriEntity></returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByNamLST (TBL_KeHoachBaoTriEntity obj,SelectOptions option)
        { 
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Nam",option),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Nam 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNam (int Nam )
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.Nam = Nam;  
            return Adapter.SelectByField(obj,"Nam");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Nam duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNam (int Nam, SelectOptions option)
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.Nam = Nam;  
            return Adapter.SelectByField(obj,"Nam",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Nam 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByNamLST (int Nam )
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.Nam = Nam;  
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Nam"),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Nam duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByNamLST (int Nam, SelectOptions option)
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.Nam = Nam;  
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Nam",option),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NoiDungBaoTri duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNoiDungBaoTri (TBL_KeHoachBaoTriEntity obj)
        { 
            return Adapter.SelectByField(obj,"NoiDungBaoTri");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NoiDungBaoTri duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNoiDungBaoTri (TBL_KeHoachBaoTriEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"NoiDungBaoTri",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NoiDungBaoTri duoc set trong object
        /// </summary>
        /// <returns>List<TBL_KeHoachBaoTriEntity></returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByNoiDungBaoTriLST (TBL_KeHoachBaoTriEntity obj)
        { 
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"NoiDungBaoTri"),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NoiDungBaoTri duoc set trong object
        /// </summary>
        /// <returns>List<TBL_KeHoachBaoTriEntity></returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByNoiDungBaoTriLST (TBL_KeHoachBaoTriEntity obj,SelectOptions option)
        { 
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"NoiDungBaoTri",option),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NoiDungBaoTri 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNoiDungBaoTri (string NoiDungBaoTri )
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.NoiDungBaoTri = NoiDungBaoTri;  
            return Adapter.SelectByField(obj,"NoiDungBaoTri");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NoiDungBaoTri duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByNoiDungBaoTri (string NoiDungBaoTri, SelectOptions option)
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.NoiDungBaoTri = NoiDungBaoTri;  
            return Adapter.SelectByField(obj,"NoiDungBaoTri",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NoiDungBaoTri 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByNoiDungBaoTriLST (string NoiDungBaoTri )
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.NoiDungBaoTri = NoiDungBaoTri;  
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"NoiDungBaoTri"),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien NoiDungBaoTri duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_KeHoachBaoTriEntity> SelectByNoiDungBaoTriLST (string NoiDungBaoTri, SelectOptions option)
        { 
            TBL_KeHoachBaoTriEntity obj = new TBL_KeHoachBaoTriEntity();
            obj.NoiDungBaoTri = NoiDungBaoTri;  
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"NoiDungBaoTri",option),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<TBL_KeHoachBaoTriEntity></returns>
        public List<TBL_KeHoachBaoTriEntity> SelectWithConditionLST (TBL_KeHoachBaoTriEntity obj)
        { 
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new TBL_KeHoachBaoTriEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<TBL_KeHoachBaoTriEntity></returns>
        public List<TBL_KeHoachBaoTriEntity> SelectWithConditionLST (TBL_KeHoachBaoTriEntity obj,SelectOptions option)
        { 
            return  (List<TBL_KeHoachBaoTriEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new TBL_KeHoachBaoTriEntity());
        }

}
}
